# -*- coding: utf-8 -*-
#
# Author:: Jonny
# Date:: 2022/4/20
import os
import random
from time import sleep


def main():
    cmd_str_tmp = f"ldconsole action --name A --key call.gravity --value 0,50,0"
    print(cmd_str_tmp)
    os.popen(cmd_str_tmp)
    sleep(float(random.uniform(2, 4)))

    cmd_str_tmp = f"ldconsole action --name A --key call.gravity --value 0,-50,0"
    print(cmd_str_tmp)
    os.popen(cmd_str_tmp)
    sleep(float(random.uniform(2, 4)))


if __name__ == "__main__":
    while True:
        main()
